import matplotlib.pyplot as plt
import numpy as np

fig, axd = plt.subplot_mosaic(
    [["a", "a", "a", "a"], ["b", "b", "c", "c"], ["d", "e", "e", "e"]],
    layout="constrained",
    # sharex=True,
    # sharey="col",
)
axd["a"].set_title("a")
axd["b"].set_title("b")
axd["c"].set_title("c")
axd["d"].set_title("d")
axd["e"].set_title("e")

plt.show()
